In recent years, wireless local area networks (Wireless Local Area Network, WLAN for short) develop rapidly. On a WLAN, such as a wireless fidelity (Wireless Fidelity, WiFi for short) network, a distributed coordinated function (Distributed Coordinated Function, DCF for short) mechanism is used for sending uplink data. In the DCF mechanism, each time user equipment (User Equipment, UE for short) has to-be-transmitted uplink data, the user equipment needs to contend for a transmission resource. A specific data transmission process is as follows: the UE detects a transmission channel; if the transmission channel is busy, the UE continuously performs detection, until the UE detects that the transmission channel is idle and an idle time is greater than a distributed interframe space (Distributed interframe space, DIFS for short), and then the UE enters a contention window; in the contention window, the UE sets a random time that is within a specific range, and if the channel is always in an idle state before the random time expires, after the random time expires, it indicates that the UE successfully obtains the resource through contention, and the UE may begin to send data to an access point (Access Point, AP for short). After completing receiving of the data sent by the UE, the AP sends an acknowledgement (Acknowledgement, ACK for short) message or a negative acknowledgement (NACK) message to the UE after a time segment of a short interframe space (Short Interframe Space, SIFS for short), thereby completing a data packet sending process. If the UE still has data packet that needs to be sent subsequently, the UE needs to repeat the channel detection process until the UE obtains a transmission resource again through contention, and sends the data packet to the AP by using the transmission resource.
However, in the foregoing procedure, a case in which random times generated by multiple UEs are the same may occur, and in this case, the multiple UEs simultaneously send uplink data to an AP, and therefore, collision occurs. In this case, the multiple UEs interfere with each other, resulting in transmission failure of the data of all the multiple UEs. More UEs that one AP serves indicate a higher probability that collision occurs. The inventor discovers that, when a base service set (Base Service Set, BSS for short) of an AP includes 40 UEs, a probability that collision occurs reaches 20%. In addition, because multiple UEs still need to contend for a transmission resource for data retransmission after collision occurs, during the data retransmission of the multiple UEs, collision may occur again. As a result, a data transmission time delay is increased, transmission efficiency of a network is reduced, and user experience is poor.